package util.io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.LinkedList;

public class ReadFileInJAR {

	/**
	 * @param args
	 */

	public LinkedList<String> readFromJARFile(String filename)
			throws IOException {
		LinkedList<String> lines = new LinkedList<String>();
		InputStream is = getClass().getResourceAsStream(filename);
		InputStreamReader isr = new InputStreamReader(is);
		BufferedReader br = new BufferedReader(isr);

		String line;
		
		while ((line = br.readLine()) != null) {
			lines.add(line.trim());

		}
		
			
		
		br.close();
		isr.close();
		is.close();

		return lines;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
